package com.example.inheritance;

public class ManagerTest {
    public static void main(String[] args) {
        var boss = new Manager("Carl Cracker", 80000, 2021, 11,20);
        boss.setBonus(5000);

        var staff = new Employee[3];
        staff[0] = boss;
        staff[1] = new Employee("Harry Hacker", 50000, 1989, 2, 19);
        staff[2] = new Employee("Tommy Tester", 40000, 1987, 1, 20);

        for(Employee e : staff){
            System.out.println("name = " + e.getName() + ", salary = " + e.getSalary());
        }
    }
}
